import 'package:flutter/material.dart';
import 'package:state_manager/mall_page.dart';
import 'package:state_manager/mine_page.dart';
import 'package:state_manager/service_page.dart';

main() => runApp(DBJApp());

class DBJApp extends StatelessWidget {
  const DBJApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(primarySwatch: Colors.green),
      home: DefaultTabController(
        length: 3,
        child: Scaffold(
          appBar: AppBar(
            title: Text('打扮家'),
            bottom: TabBar(
              indicatorColor: Colors.purple,
              tabs: [
                Tab(
                  child: Text('tab1'),
                ),
                Tab(
                  child: Text('tab2'),
                ),
                Tab(
                  child: Text('tab3'),
                ),
              ],
            ),
          ),
          body: TabBarView(
            children: [
              DBJMallPage(),
              DBJMinePage(),
              DBJServicePage(),
              // Container(
              //   color: Colors.brown,
              // ),
              // Container(
              //   color: Colors.pink,
              // ),
              // Container(
              //   color: Colors.yellow,
              // )
            ],
            //physics: NeverScrollableScrollPhysics(),
          ),
        ),
      ),
    );
  }
}

class DBJHomeBody extends StatelessWidget {
  const DBJHomeBody({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container();
  }
}
